# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: sxe <sxxe@gmx.de>

pkgname=flowblade
pkgver=2.10.0.4
pkgrel=1
pkgdesc='Multitrack non-linear video editor'
arch=('any')
url='https://jliljebl.github.io/flowblade/'
license=('GPL3')
depends=('dbus-python' 'ffmpeg' 'frei0r-plugins' 'gmic' 'gtk3' 'mlt' 'python-cairo'
         'python-gobject' 'python-numpy' 'python-pillow' 'sdl_image' 'swh-plugins')
source=("https://github.com/jliljebl/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('9431dc80a3ff3a899953cd5864c00335b355fb44c0601895b0dd57268b40bdf9')

prepare() {
  cd $pkgname-$pkgver/$pkgname-trunk
  _python_site_packages=`python -c 'import site; print(site.getsitepackages()[0])'`
  sed -i "s|/usr/share/pyshared/Flowblade|$_python_site_packages/Flowblade|" flowblade
}

build() {
  cd $pkgname-$pkgver/$pkgname-trunk
  python setup.py build
}

package() {
  cd $pkgname-$pkgver/$pkgname-trunk
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
